<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/1 0001
 * Time: 下午 11:19
 */

namespace app\controller;


use think\Container;
use think\facade\Config;
use think\facade\Route;

class Url
{

    function index(){

        //return "url";
        //return Route::buildUrl("Url/detail",['id'=>99]);
        //return Route::buildUrl("u",['id'=>99])->suffix(".jpg");
        //return Route::buildUrl("u",['id'=>99])->domain(true);
        //return Route::buildUrl("u/558")->domain("abc");
        //return Route::buildUrl("u/999@www.baidu.com");
        return url("u/100")->suffix("");
    }

    function detail($id){
        return "detail ".$id;

    }

    function facade(){

        //return \app\facade\Test::hello("我草");
        //return \app\common\Test::jack();
        //return app(\app\common\Test::class)->hello("我去");
        //return Container::getInstance()[\app\common\Test::class]->hello("666");
        return json(Config::get("app"));
    }
}